package com.canbot.u05.activity.shoppingGuide.codeMarketing;

import com.canbot.u05.R;
import com.canbot.u05.bean.codeMarketing.CodeMarketingInfo;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zmp
 * 二维码数据辅助类
 */
public class CodeDataHelper {

        public static final List<Integer> CODE_DRAWS = new ArrayList<>();

        static {
                CODE_DRAWS.add(R.drawable.code_marketing_bg1);
                CODE_DRAWS.add(R.drawable.code_marketing_bg2);
                CODE_DRAWS.add(R.drawable.code_marketing_bg3);
                CODE_DRAWS.add(R.drawable.code_marketing_bg4);
                CODE_DRAWS.add(R.drawable.code_marketing_bg5);
                CODE_DRAWS.add(R.drawable.code_marketing_bg6);
                CODE_DRAWS.add(R.drawable.code_marketing_bg7);
                CODE_DRAWS.add(R.drawable.code_marketing_bg8);
        }

        private static CodeDataHelper mCodeDataHelper;

        public CodeMarketingInfo getCodeMarketingSave() {
                return codeMarketingSave;
        }


        private CodeMarketingInfo codeMarketingInfo;

        private CodeMarketingInfo codeMarketingSave;

        public void setCodeMarketingSave(CodeMarketingInfo codeMarketingSave) {
                this.codeMarketingSave = codeMarketingSave;
        }


        private CodeDataHelper() {
                codeMarketingInfo = new CodeMarketingInfo();
        }

        public static CodeDataHelper getInstance() {
                if (mCodeDataHelper == null) {
                        mCodeDataHelper = new CodeDataHelper();
                }
                return mCodeDataHelper;
        }

        public CodeMarketingInfo getCodeMarketingInfo() {
                return codeMarketingInfo;
        }

        public void resetCodeInfo() {
                codeMarketingInfo = new CodeMarketingInfo();
        }

        public void saveData() {
                codeMarketingSave = codeMarketingInfo;
        }
}
